#include "clerk_review_acc_open.h"
#include "ui_clerk_review_acc_open.h"
#include "QSqlDatabase"
#include "QSqlQuery"
#include "QDebug"
#include "QMessageBox"

clerk_review_acc_open::clerk_review_acc_open(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::clerk_review_acc_open)
{
    ui->setupUi(this);
    this->setWindowTitle("开户审核");
}

clerk_review_acc_open::~clerk_review_acc_open()
{
    delete ui;
}

void clerk_review_acc_open::on_confirm_clicked()
{
    QSqlDatabase sqlite_dep = QSqlDatabase::database("deposit");
    QSqlQuery query_dep(sqlite_dep);

    query_dep.prepare("UPDATE DEPOSIT SET reviewstatus = ? WHERE custtelnumber = ? ");
    query_dep.addBindValue(ui->comboBox->currentText());
    query_dep.addBindValue(ui->cust_card_id->text());
    query_dep.exec();

    QMessageBox box;
    box.setWindowTitle("completed");
    box.setText("审核成功");
    box.setIcon(QMessageBox::Information);
    box.exec();
    return;
}
